package org.example.service.service;
import io.grpc.Server;
import io.grpc.ServerBuilder;
import org.example.service.HelloServiceImpl;

/**
 * @Author : 叶荻风
 * @create : 2024/6/20 11:33
 */
public class GrpcService {
    public static void main(String[] args) {
        try{
            Server server= ServerBuilder.forPort(9000).addService(new HelloServiceImpl()).build();
            server.start();
            server.awaitTermination();
        }catch (Exception e){
            System.out.println(e.getMessage());
        }

    }
}
